// ========================================================================
// FileName : system_functions.v
// Function : Miscellaneous string and simulator console message operations.
//
// ------------------------------------------------------------------------
// Author   : QilinZhao
// Version  : v-1.0
// Date     : 2013-08-30
// E-mail   : forqilin@163.com
// copyright: QiXin Studio
// ========================================================================

`timescale 1ns/1ns

module system_functions;
  
  reg clk, sig;
  
  always@(posedge clk)
  begin
    if (clk!==sig) // "!==" sees x and z differences.
      $strobe("\n**** Simulation time=%04d.  Compare clk=[%01b] and sig=[%01b] failed.\n", $time, clk, sig);
  end
  
  initial
  begin
       clk = 1'b0;
       sig = 1'bz;
    #2 clk = 1'b1;
    #2 clk = 1'b0;
    
    #10 ;
    sig = 1'b0;
    
    #2 clk = 1'b1;
    #2 clk = 1'b0;
    #10 $finish;
  end
  
endmodule // system_functions
